﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="search_list.ascx.cs" Inherits="uswinweb.datacontrol.search_list" %>
		<div class="adnr4">
			<p class="lt"> 找到相关信息 <b class="f_f96900"><%=recordcount%></b> 条</p>
			<p class="rt">
			<%= minoPageStr %>
			</p>
		</div>
		<div class="adnr3">
<table border="0" cellpadding="0" cellspacing="0" class="edtb">
				<thead>
					<tr>
						<td>起运港</td>
						<td>目的港</td>
						<td>船司</td>
						<td>中转港</td>
						<td>码头</td>
						<td>20GP</td>
						<td>40GP</td>
						<td>40HQ</td>
						<td>附加费用</td>
						<td>截关</td>
						<td>开船</td>
						<td>航程</td>
						<td>有效期</td>
						<td>备注</td>
                        <%if (gid != 0&&gid!=1)
                          { %>
                          <td>报价提供</td>
                        <%} %>
						<td>#</td>
					</tr>
				</thead>
				<tbody>
                <%
                    int iii = 1;
                    foreach (LTJ.Entity.RouteBaseInfo rbInfo in routesTab)
                  { %>
					<tr>
						<td><%=rbInfo.loadportename %></td>
						<td onmouseover="showMsgDiv('<%=iii %>',1,'所属航线：<%=rbInfo.mdghxname %><br/>所属国家：<%=rbInfo.mdggjname %><br/>中文名：<%=rbInfo.mdgname %><br/>英文名：<%=rbInfo.mdgename %><br/>')" onmouseout="hiddMsgDiv()" >
                        <div id="minodiv_<%=iii %>_1"  ><a   href="../mdg_detail.aspx?type=1&mdg=<%=rbInfo.destport %>" rel="iframe" title=" :: :: width:800,height:600"  class="lightview"><%=rbInfo.destportename%></a>
                        </div>
                        </td>
						<td  onmouseover="showMsgDiv('<%=iii %>',2,'<%=rbInfo.bcodename %>')" onmouseout="hiddMsgDiv()" ><div id="minodiv_<%=iii %>_2"><a id="luffy_href_<%=iii %>"   href="../mdg_detail.aspx?type=2&mdg=<%=rbInfo.bcode %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview"><%=rbInfo.bcode %></a></div>
						</td>
						<td>
                         <%=rbInfo.tranport.ToString().Trim() == "" ? "直航" : rbInfo.tranportename%>
						</td>
						<td>
                        <%=rbInfo.pier %>
						</td>
						<td>
                        <%if (gid == 0)
                          { %>
                        <%=rbInfo.Ope20.ToString().Trim() == "" ? "0" : rbInfo.Ope20.ToString()%>
                        <%}
                          else if (gid == 1)
                          {%>
                        <%=rbInfo.Reg20.ToString() == "" ? "0" : rbInfo.Reg20.ToString()%>
                        <%}
                          else
                          {%>
                          <%=rbInfo.Vip20.ToString() == "" ? "0" : rbInfo.Vip20.ToString()%>
                          <%} %>
						</td>
						<td>
                        <%if (gid == 0)
                          { %>
                        <%=rbInfo.Ope40.ToString() == "" ? "0" : rbInfo.Ope40.ToString()%>
                        <%}
                          else if (gid == 1)
                          {%>
                        <%=rbInfo.Reg40.ToString() == "" ? "0" : rbInfo.Reg40%>
                        <%}
                          else
                          {%>
                          <%=rbInfo.Vip40.ToString() == "" ? "0" : rbInfo.Vip40%>
                          <%} %></td>
						<td>
                        <%if (gid == 0)
                          { %>
                        <%=rbInfo.Ope40HQ.ToString() == "" ? "0" : rbInfo.Ope40HQ%>
                        <%}
                          else if (gid ==1 )
                          {%>
                        <%=rbInfo.Reg40HQ.ToString() == "" ? "0" : rbInfo.Reg40HQ%>
                        <%}
                          else
                          {%>
                          <%=rbInfo.Vip40HQ.ToString() == "" ? "0" : rbInfo.Vip40HQ%>
                          <%} %></td>
                       <td onmouseover="showMsgDiv('<%=iii %>',5,'文件费：<%=rbInfo.wjfvip.ToString()==""?"0":rbInfo.wjfvip.ToString() %><br/>AMS/ENS:<%=rbInfo.amsensvip.ToString()==""?"0":rbInfo.amsensvip.ToString() %><br/>THC:<%=rbInfo.thcvip.ToString()==""?"0":rbInfo.thcvip.ToString() %><br/>箱单：<%=rbInfo.xdvip.ToString()==""?"0": rbInfo.xdvip.ToString()%>')" onmouseout="hiddMsgDiv()">
                       <div id="minodiv_<%=iii %>_5"> <a href="../fjfy.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview">AMS/ENS:<%= rbInfo.amsensvip.ToString()%></a>
                       </div>
                       </td>
                         <td><%=rbInfo.schbegin %></td>
						<td>
                        <%=rbInfo.schend %>
						</td>
						<td>
                        <%=rbInfo.range.Trim()==""?"&nbsp;":rbInfo.range.Trim() %>
						</td>
						<td onmouseover="showMsgDiv('<%=iii %>',3,'<%=rbInfo.validbegin %>-<%=rbInfo.validend %>')" onmouseout="hiddMsgDiv()"><div id="minodiv_<%=iii %>_3"><%=rbInfo.validbegin.Substring(rbInfo.validbegin.IndexOf('-')+1,rbInfo.validbegin.Length-rbInfo.validbegin.IndexOf('-')-1).Replace('-','/').TrimStart('0') %>-<%=rbInfo.validend.Substring(rbInfo.validend.IndexOf('-') + 1, rbInfo.validend.Length - rbInfo.validend.IndexOf('-') - 1).Replace('-', '/').TrimStart('0')%>
                        </div>
                        </td>
                        <%if (rbInfo.bio.ToString() == "")
                          { %>
                          <td>&nbsp;</td>
                        <%}
                          else
                          {%>
                         <td onmouseover="showMsgDiv('<%=iii %>',4,'<%=LTJ.Common.Utils.StrFormat(rbInfo.bio).Length>10?LTJ.Common.Utils.StrFormat(rbInfo.bio).Substring(0,10):LTJ.Common.Utils.StrFormat(rbInfo.bio) %>')" onmouseout="hiddMsgDiv()">
                         <div id="minodiv_<%=iii %>_4"> <a href="../beizhu.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:600,height:400" class="lightview"><%=rbInfo.bio.ToString().Length > 5 ? rbInfo.bio.ToString().Substring(0, 5) : rbInfo.bio.ToString()%></a>
                         </div>
                         </td>
                          <%} %>
						<%if (gid != 0&&gid!=1)
        { %>
        <td onmouseover="showMsgDiv('<%=iii %>',6,'公司名称：<%=rbInfo.cidname%><br/>公司联系人：<%=LTJ.Common.Utils.ReplaceStrToScript(rbInfo.cidrelater) %><br/>公司联系方式：<%=LTJ.Common.Utils.StrFormat(rbInfo.cidrelateform) %>')" onmouseout="hiddMsgDiv()">
            <div id="minodiv_<%=iii %>_6"><%=rbInfo.cidname %>
            </div>
        </td>
                        <%} %>
                    <td><a href="../price_detailed.aspx?rid=<%=rbInfo.id %>" rel="iframe" title=" :: :: width:800,height:600" class="lightview">详细</a></td>
					</tr>
                    <%
                        iii++;
                    } %>
				</tbody>
			<tfoot>
				<tr>
					<td colspan="25">
						<%=pageList %>
					</td>
				</tr>
			</tfoot>
			</table>
            </div>
            <script>
                function searchlist_serarch() {
                    loading();
                    var qyg = document.getElementById('qyg_txt').value;
                    var mdg = document.getElementById('mdg_txt').value;
                    var cs = document.getElementById('cs_txt').value;
                    var zzg = document.getElementById('zzg_txt').value;
                    var mt = document.getElementById('mt_txt').value;
                    var gp1 = document.getElementById('gp1_txt').value;
                    var bio = document.getElementById('bio_txt').value;
                    var hc = document.getElementById('hc_txt').value;
                    var schbegin = document.getElementById('schbegin_sel').value;
                    var schend = document.getElementById('schend_sel').value;
                    AjaxHelper.Updater('search_list.ascx', 'showdata', 'action=search&schbegin=' + schbegin + '&schend=' + schend + '&hc=' + hc + '&qyg=' + qyg + '&bio=' + bio + '&gp1=' + gp1 + '&zzg=' + zzg + '&mt=' + mt + '&cs=' + cs + '&mdg=' + mdg);
                }
                function ww(val1,val2,val3) {
                    var ss = search_list.getOrder(val3);
                    showMsgDiv(val1, val2, ss.value);
                }

                function showMsgDiv(val1,val2,val3) {
                    var minoDiv = document.getElementById('minodiv_' + val1 + '_' + val2);
                    var body = document.getElementsByTagName("body")[0];

                    var oldImgdiv = document.getElementById("showMsg");
                    if (oldImgdiv != null) {
                        oldImgdiv.style.display = 'block';
                        oldImgdiv.style.top = getElementTop(minoDiv) + 80 + "px";
                        oldImgdiv.style.left = getElementLeft(minoDiv) + 130 + "px";
                        oldImgdiv.innerHTML = val3;
                    }
                    else {
                        var bodySize = [];
                        bodySize[0] = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.clientWidth; //如果滚动条的宽度大于页面的宽度，取得滚动条的宽度，否则取页面宽度
                        bodySize[1] = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight; //如果滚动条的高度大于页面的高度，取得滚动条的高度，否则取高度

                        var div = document.createElement("div");
                        div.style.position = "absolute";
                        div.style.top = getElementTop(minoDiv) + 80 + "px";
                        div.style.left = getElementLeft(minoDiv) + 130 + "px";
                        div.style.margin = "-50px 0 0 -100px";
                        div.style.padding = "15px";
                        div.style.border = "0px solid #B2D0F7";
                        div.style.color = "#003366";
                       // div.style.font = "bold 14px verdana,tahoma,helvetica";
                        div.style.background = 'white';
                        div.style.textAlign = "center";
                        div.innerHTML = val3;
                        div.id = "showMsg";
                        body.appendChild(div);
                        div.style.display = "block";
                    }
                }

                function getElementLeft(element) {
                    var actualLeft = element.offsetLeft;
                    var current = element.offsetParent;
                    while (current !== null) {
                        actualLeft += current.offsetLeft;
                        current = current.offsetParent;
                    }
                    return actualLeft;
                }
                function getElementTop(element) {
                    var actualTop = element.offsetTop;
                    var current = element.offsetParent;
                    while (current !== null) {
                        actualTop += current.offsetTop;
                        current = current.offsetParent;
                    }
                    return actualTop;
                }
                function hiddMsgDiv() {
                    if (document.getElementById('showMsg')) {
                        document.getElementById('showMsg').style.display = 'none';
                    }
                }
//                function showfjfyDiv(val1, val2, val3, val4) {
//                    var rooturl = 'http://www.uswin.com/';
//                    jQuery.ajax({
//                        url: rooturl + 'GetFjfy.aspx', //后台处理程序
//                        type: 'post',         //数据发送方式
//                        dataType: 'json',     //接受数据格式
//                        data: { rid: val4 },         //要传递的数据
//                        success: update_page //回传函数(这里是函数名)
//                    });
//                   }
//                   function update_page(json) {
//                       alert(json);
//                   }
            </script>